package com.xueyiyue.xueyiyue.service.impl;


import com.xueyiyue.xueyiyue.dao.CommonMapper;
import com.xueyiyue.xueyiyue.model.entity.City;
import com.xueyiyue.xueyiyue.model.entity.District;
import com.xueyiyue.xueyiyue.model.entity.Province;
import com.xueyiyue.xueyiyue.service.CommonService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author chenlixian
 * @description 公共服务接口实现类
 * @date 2020/8/18 0:17
 */
@Slf4j
@Service
public class CommonServiceImpl implements CommonService {
    @Autowired
    private CommonMapper commonMapper;
    @Override
    public List<Province> getProvince() {
        return commonMapper.getProvince();
    }

    @Override
    public List<City> getCity(String provinceId) {
        return commonMapper.getCity(provinceId);
    }

    @Override
    public List<District> getDistrict(String cityId) {
        return commonMapper.getDistrict(cityId);
    }
}
